/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entidad;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 *
 * @author reinaldo
 */
@Entity
@Table(name = "reportemedico")
@NamedQueries({@NamedQuery(name = "Reportemedico.findAll", query = "SELECT r FROM Reportemedico r"), @NamedQuery(name = "Reportemedico.findById", query = "SELECT r FROM Reportemedico r WHERE r.id = :id"), @NamedQuery(name = "Reportemedico.findByPeso", query = "SELECT r FROM Reportemedico r WHERE r.peso = :peso"), @NamedQuery(name = "Reportemedico.findByTalla", query = "SELECT r FROM Reportemedico r WHERE r.talla = :talla"), @NamedQuery(name = "Reportemedico.findByImc", query = "SELECT r FROM Reportemedico r WHERE r.imc = :imc"), @NamedQuery(name = "Reportemedico.findByTriceps", query = "SELECT r FROM Reportemedico r WHERE r.triceps = :triceps"), @NamedQuery(name = "Reportemedico.findBySubescapular", query = "SELECT r FROM Reportemedico r WHERE r.subescapular = :subescapular"), @NamedQuery(name = "Reportemedico.findBySuprailiaco", query = "SELECT r FROM Reportemedico r WHERE r.suprailiaco = :suprailiaco"), @NamedQuery(name = "Reportemedico.findByAbdominal", query = "SELECT r FROM Reportemedico r WHERE r.abdominal = :abdominal"), @NamedQuery(name = "Reportemedico.findByMuslo", query = "SELECT r FROM Reportemedico r WHERE r.muslo = :muslo"), @NamedQuery(name = "Reportemedico.findByPierna", query = "SELECT r FROM Reportemedico r WHERE r.pierna = :pierna"), @NamedQuery(name = "Reportemedico.findByYchasz", query = "SELECT r FROM Reportemedico r WHERE r.ychasz = :ychasz"), @NamedQuery(name = "Reportemedico.findByCintura", query = "SELECT r FROM Reportemedico r WHERE r.cintura = :cintura")})
public class Reportemedico implements Serializable {

    private static final long serialVersionUID = 1L;

    /*llave primaria*/
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id",nullable=false)
    private Integer id;

    /*relaciones uno a uno*/
    @OneToOne(mappedBy="reporteMedico")
    private Afiliado idAfiliado;


    
    /*atributos primitivos*/
    @Column(name = "peso")
    private Double peso;
    @Column(name = "talla")
    private Double talla;
    @Column(name = "imc")
    private Double imc;
    @Column(name = "triceps")
    private Double triceps;
    @Column(name = "subescapular")
    private Double subescapular;
    @Column(name = "suprailiaco")
    private Double suprailiaco;
    @Column(name = "abdominal")
    private Double abdominal;
    @Column(name = "muslo")
    private Double muslo;
    @Column(name = "pierna")
    private Double pierna;
    @Column(name = "ychasz")
    private Double ychasz;
    @Column(name = "cintura")
    private Double cintura;

    public Reportemedico() {
    }


    public Reportemedico(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Double getPeso() {
        return peso;
    }

    public void setPeso(Double peso) {
        this.peso = peso;
    }

    public Double getTalla() {
        return talla;
    }

    public void setTalla(Double talla) {
        this.talla = talla;
    }

    public Double getImc() {
        return imc;
    }

    public void setImc(Double imc) {
        this.imc = imc;
    }

    public Double getTriceps() {
        return triceps;
    }

    public void setTriceps(Double triceps) {
        this.triceps = triceps;
    }

    public Double getSubescapular() {
        return subescapular;
    }

    public void setSubescapular(Double subescapular) {
        this.subescapular = subescapular;
    }

    public Double getSuprailiaco() {
        return suprailiaco;
    }

    public void setSuprailiaco(Double suprailiaco) {
        this.suprailiaco = suprailiaco;
    }

    public Double getAbdominal() {
        return abdominal;
    }

    public void setAbdominal(Double abdominal) {
        this.abdominal = abdominal;
    }

    public Double getMuslo() {
        return muslo;
    }

    public void setMuslo(Double muslo) {
        this.muslo = muslo;
    }

    public Double getPierna() {
        return pierna;
    }

    public void setPierna(Double pierna) {
        this.pierna = pierna;
    }

    public Double getYchasz() {
        return ychasz;
    }

    public void setYchasz(Double ychasz) {
        this.ychasz = ychasz;
    }

    public Double getCintura() {
        return cintura;
    }

    public void setCintura(Double cintura) {
        this.cintura = cintura;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Reportemedico)) {
            return false;
        }
        Reportemedico other = (Reportemedico) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidad.Reportemedico[id=" + id + "]";
    }

}
